package com.beiju.quartz.task;

import com.beiju.system.domain.SysNotice;
import com.beiju.system.service.ISysNoticeService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @version v1.0
 * @ClassName: MyTask.java
 * @Description: TODO(一句话描述该类的功能)
 * @Author: BeiJu
 * @Date: 2020/11/6 13:58
 */
@Component("myTask")
public class MyTask {
	@Resource
	private ISysNoticeService noticeService;

	public void addNotice(String noticeTitle, String noticeType, String noticeContent, String status){
		SysNotice notice = new SysNotice();
		notice.setNoticeTitle(noticeTitle);
		notice.setNoticeType(noticeType);
		notice.setNoticeContent(noticeContent);
		notice.setStatus(status);
		System.out.println(notice);
		noticeService.insertNotice(notice);
	}
}